<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="../../CSS/reset.css">
    <style>
        .box1,
        .box2 {
            width: 100px;
            height: 100px;

        }

        .box1 {
            background-color: rgb(241, 43, 43);
            width: 200px;
            height: 200px;
           
            line-height: 100px;
            text-align: center;
            font-size: 100px;
            position: absolute;
            z-index: 0;

        }

        .box2 {
            background-color: rgb(122, 228, 171);
            /* z-index: auto; */
            position:relative;
            z-index: 7;
        }

        .box3 {
            background-color: rgb(33, 118, 203);
            width: 50px;
            height: 50px;
            position:absolute;
            z-index: 8;
        }
    </style>
</head>

<body>
    <div class="box1">1</div>
    <div class="box2">2
        <div class="box3">3</div>
    </div>
</body>

</html>